<?php $this->load->view("common/page_header");?>
<div id="body_main">
	<div id="admin_header">
		<?php $this->load->view('common/admin_header'); ?>
		<div class="top_cleft">
			<ul>
				<li class="current"><a href="/console/members/user_verify">审批验证</a></li>
				<li><a href="/console/members/banned">会员管理</a></li>
			</ul>
			<form class="right">
				<input type="text" />
				<input type="button" value="搜索会员"/>
			</form>
			<div class="clear"></div>
		</div>
	</div>
	<div id="admin_content">
		<div id="admin_navigator">
			<ul class="navigator">
				<li <?php echo $type == 'id' ? 'class="current"' : '';?>><a href="/console/members/user_verify">审批身份验证</a></li>
				<li <?php echo $type == 'expert' ? 'class="current"' : '';?>><a href="/console/members/user_verify?type=expert">审批行业验证</a></li>
				<li <?php echo $type == 'pass' ? 'class="current"' : '';?>><a href="/console/members/user_verify?type=pass">撤消验证</a></li>
			</ul>
		</div>
		<div id="admin_body">
			<div class="margin_bottom10">
				<span class="bold">需要审批的<?php echo $type == 'id' ? '身份' : '专家'?>验证</span>
				<a href="javascript:void(0);" class="orange_button" id="refuse" style="float:right;#margin-top:-26px;">拒绝</a>
				<?php if($type != 'pass') {?><a href="javascript:void(0);" class="orange_button" id="pass" style="float:right;#margin-top:-26px;">批准</a><?php }?>
				<div class="clear"></div>
			</div>
			<form method="post" action="/console/members/approve" id="approve-form">
			<table class="a_table vertical_top_table">
				<tr>
					<th width="70">证件名称</th>
					<th width="94">证件号码</th>
					<th width="109">手机号</th>
<!--					<th width="174">身份证号码</th>-->
					<th width="54">姓名</th>
					<th width="48">文件</th>
					<td width="65"><input type="checkbox" id="check-all"/>全选</td>
				</tr>
				<?php if (!empty($vertifications)) {?>
				<?php foreach ($vertifications as $vertification) { ?>
				<tr>
					<td><?php echo $vertification['obj_name'];?></td>
					<td><?php echo $vertification['obj_value'];?></td>
					<td><?php echo $vertification['mobile'];?></td>
<!--					<td>411081197903224875</td>-->
					<td><?php echo $vertification['nickname'];?></td>
					<td><a href="/img/uploads/<?php echo $vertification['pic'];?>" target="_blank">&gt;查看</a></td>
					<td style="text-align:left;padding-left:21px;"><input type="checkbox" name="ids[]" value="<?php echo $vertification['id'];?>" /></td>
				</tr>
				<?php } ?>
				<?php }?>
			</table>
			<input type="hidden" name="act" value="" id="act-hidden"></input>
			<input type="hidden" name="type" value="<?php echo $type?>"></input>
			</form>
		</div>
		<div class="clear"></div>
	</div>
	<?php $this->load->view("common/footer");?>	
</div>
<script type="text/javascript">
$(document).ready(function(){
	$("#refuse").click(function() {
		$("#act-hidden").val("refuse");
		$("#approve-form").submit();
	});
	$("#pass").click(function() {
		$("#act-hidden").val("pass");
		$("#approve-form").submit();
	});
	$("#check-all").click(function() {
		$("input[name='ids[]']").each(function(){
			if($(this).attr("checked") == 'checked') {
				$(this).attr("checked", false);
			} else {
				$(this).attr("checked", true);
			}
		});
	});
});	
</script>	
<?php $this->load->view("common/page_footer");?>

